package p270jp.pxv.android.viewholder;

import android.view.ViewGroup;
import p064c6.Preconditions;
import p189gn.AbstractC3435a;
import p210hh.PixivAccountManager;
import p216hn.Reflection;
import p270jp.pxv.android.model.PixivPrivacyPolicy;
import p325m0.MutabilityOwnership;
import p376no.Koin;
import p404oo.AbstractC5475a;
import p468re.AccessTokenLifetimeService;
import p521th.FlexibleItemAdapterSolidItem;
import p521th.SolidItemViewHolder;
import p579vo.Qualifier;
import p603wm.AbstractC6949c;
import p671zc.CompositeDisposable;

/* compiled from: GdprSolidItem.kt */
/* renamed from: jp.pxv.android.viewholder.GdprSolidItem */
/* loaded from: classes2.dex */
public final class GdprSolidItem extends FlexibleItemAdapterSolidItem implements AbstractC5475a {
    public static final int $stable;
    private final PixivPrivacyPolicy privacyPolicy;
    private final CompositeDisposable compositeDisposable = new CompositeDisposable();
    private final AbstractC6949c accessTokenLifetimeService$delegate = Preconditions.m9802P(1, new AbstractC3435a<AccessTokenLifetimeService>(null, null) { // from class: jp.pxv.android.viewholder.GdprSolidItem$special$$inlined$inject$default$1
        public final /* synthetic */ AbstractC3435a $parameters;
        public final /* synthetic */ Qualifier $qualifier;

        {
            this.$qualifier = r2;
            this.$parameters = r3;
        }

        /* JADX WARN: Type inference failed for: r0v4, types: [re.a, java.lang.Object] */
        @Override // p189gn.AbstractC3435a
        public final AccessTokenLifetimeService invoke() {
            Koin koin = AbstractC5475a.this.getKoin();
            return koin.f24118a.m920a().m621a(Reflection.m5499a(AccessTokenLifetimeService.class), this.$qualifier, this.$parameters);
        }
    });

    public GdprSolidItem(PixivPrivacyPolicy pixivPrivacyPolicy) {
        MutabilityOwnership.m3745m(pixivPrivacyPolicy, "privacyPolicy");
        this.privacyPolicy = pixivPrivacyPolicy;
    }

    private final AccessTokenLifetimeService getAccessTokenLifetimeService() {
        return (AccessTokenLifetimeService) this.accessTokenLifetimeService$delegate.getValue();
    }

    @Override // p404oo.AbstractC5475a
    public Koin getKoin() {
        return AbstractC5475a.C5476a.m3211a(this);
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public int getSpanSize() {
        return 2;
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public SolidItemViewHolder onCreateViewHolder(ViewGroup viewGroup) {
        MutabilityOwnership.m3745m(viewGroup, "parent");
        return GdprSolidItemViewHolder.Companion.createViewHolder(viewGroup, this.privacyPolicy, getAccessTokenLifetimeService(), this.compositeDisposable);
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public void onDetachedFromRecyclerView() {
        this.compositeDisposable.m80f();
    }

    @Override // p521th.FlexibleItemAdapterSolidItem
    public boolean shouldBeInserted(int i, int i2, int i3, int i4) {
        return i3 == 0 && PixivAccountManager.m5511e().f16507m;
    }
}
